home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / role / TACL.lha / TACL / JungleSource.zoo / JungleObjects < prev    next >
Text File  |  1989-09-11  |  6KB  |  347 lines

  1. *
  2. *  Sample T.A.C.L. Adventure Game source code. © 1989 by Kevin Kelm.
  3. *  total of 25 points possible this file
  4. OBJECT Lamp
  5.  
  6. NAME Lamp, Light, FlashLight
  7.  
  8. ADJ Flash, Old
  9.  
  10. ATTRIB
  11.  On N
  12.  FirstGrab Y
  13. ENDATTRIB
  14.  
  15. INITROOM Float_Plane
  16.  
  17. CODE
  18.  IF PLAYER HAS Lamp THEN
  19.   IF Lamp IS On THEN
  20.    T A lamp (currently on)
  21.   ELSE
  22.    T A lamp (currently off)
  23.   ENDIF
  24.  ELSE
  25.   T There is a lamp here.
  26.  ENDIF
  27.  IF Lamp IS On THEN
  28.   IMAGE Lamp Lamp_Lit
  29.  ELSE
  30.   IMAGE Lamp Lamp_Unlit
  31.  ENDIF
  32. ENDCODE
  33.  
  34. ACTION GET, TAKE, GRAB
  35.  IF PLAYER HAS Lamp THEN
  36.   T You already have it.
  37.  ELSE
  38.   T You pick up the lamp.
  39.   GRAB Lamp
  40.   IF Lamp IS FirstGrab THEN
  41.    SCORE 5
  42.    UNSET Lamp FirstGrab
  43.   ENDIF
  44.  ENDIF
  45. ENDACT
  46.  
  47. ACTION DROP
  48.  IF PLAYER HAS Lamp THEN
  49.   DROP Lamp
  50.   IF InCaverns = 1 THEN
  51.    T You drop the lamp and it shatters.  Afraid of the dark?  You should be!
  52.    PLACEOBJ Lamp NoWhere  * bye bye!
  53.    LINK THISROOM N Dark_Death
  54.    LINK THISROOM S Dark_Death       * player is done for!
  55.    LINK THISROOM E Dark_Death
  56.    LINK THISROOM W Dark_Death
  57.    LINK THISROOM U Dark_Death
  58.    LINK THISROOM D Dark_Death
  59.   ELSE
  60.    T Dropped.
  61.   ENDIF
  62.  ELSE
  63.   T You can't drop something you don't have!
  64.  ENDIF
  65. ENDACT
  66.  
  67. ACTION LOOK, EXAMINE, SEE, VIEW
  68.  IF Lamp IS On THEN
  69.   T Though old, the lamp works well.  It now glows with a warm yellow light.
  70.   SHOW Lamp_Lit
  71.  ELSE
  72.   T The lamp looks to be in bad shape.  It is off.
  73.   SHOW Lamp_Unlit
  74.  ENDIF
  75. ENDACT
  76.  
  77. ACTION LIGHT
  78.  IF PLAYER HAS Lamp THEN
  79.   IF Lamp NOT On THEN
  80.    T The old lamp flares to life.
  81.    SET Lamp On
  82.    EQU CanSee 1
  83.    LINK Cavern_Entrance N Rock_Slide
  84.    LINK Cavern_Entrance S Stair_Well
  85.    IMAGE Lamp Lamp_Lit
  86.   ELSE
  87.    T You burn your fingers trying.
  88.   ENDIF
  89.  ELSE
  90.   T You don't have it.
  91.  ENDIF
  92. ENDACT
  93.  
  94. ACTION EXTINGUISH, PUT, BLOW, DOUSE
  95.  IF PLAYER HAS Lamp THEN
  96.   IF Lamp IS On THEN
  97.    IF InCaverns = 0 THEN
  98.     T The lamp goes dim.
  99.     UNSET Lamp On
  100.     EQU CanSee 0
  101.     LINK Cavern_Entrance N Dark_Death
  102.     LINK Cavern_Entrance S Dark_Death
  103.     IMAGE Lamp Lamp_Unlit
  104.    ELSE
  105.     T That would be very unwise at this point.
  106.    ENDIF
  107.   ELSE
  108.    T That has already been done.
  109.   ENDIF
  110.  ELSE
  111.   T You don't have it.
  112.  ENDIF
  113. ENDACT
  114.  
  115. ENDOBJ
  116. *
  117. *
  118. *
  119. OBJECT Big_Tree
  120.  
  121. NAME Tree
  122.  
  123. ADJ Big, Large
  124.  
  125. INITROOM Jungle_Path
  126.  
  127. CODE
  128.  IF PLAYER IN Jungle_Path THEN
  129.   T There is an exceptionally large tree here.
  130.  ENDIF
  131. ENDCODE
  132.  
  133. ACTION CLIMB
  134.  IF PLAYER IN Jungle_Path THEN
  135.   T You climb up the massive old tree.
  136.   GO Forest_Canopy
  137.  ELSE
  138.   T Deciding not to go any higher, you lower yourself back to the ground.
  139.   GO Jungle_Path
  140.  ENDIF
  141. ENDACT
  142.  
  143. ACTION EXAMINE, LOOK, SEE, VIEW
  144.  IF PLAYER IN Jungle_Path THEN
  145.   T The old tree has many knobs and protrusions and towers up through the
  146.   T forest's roof of leaves.
  147.   SHOW Jungle_Tree
  148.  ELSE
  149.   T You see yourself standing on a large limb in this great tree about
  150.   T 40 feet off the ground.  Smaller branches continue above you, but the
  151.   T don't look very safe.  There are some vines snaking through the limbs,
  152.   T connecting to other trees.
  153.   SHOW In_Tree
  154.  ENDIF
  155.  
  156. ENDACT
  157.  
  158. ENDOBJ
  159. *
  160. *
  161. *
  162. OBJECT Vine
  163.  
  164. NAME Vine, Vines         * the latter is a hack :)
  165.  
  166. ADJ Long, Old
  167.  
  168. ATTRIB
  169.  Tied
  170.  FirstGrab Y
  171. ENDATTRIB
  172.  
  173. INITROOM Forest_Canopy
  174.  
  175. CODE
  176.  IF PLAYER HAS Vine THEN
  177.   T A long piece of vine
  178.  ELSE
  179.   IF PLAYER IN Forest_Canopy THEN
  180.    T There are some vines snaking through the limbs, connecting to other
  181.    T trees.
  182.   ELSIF PLAYER IN Ledge THEN
  183.    IF Vine IS Tied THEN
  184.     T There is a vine tied to a tree here.
  185.    ELSE
  186.     T There is a vine here.
  187.    ENDIF
  188.   ELSE
  189.    T There is a vine here.
  190.   ENDIF
  191.  ENDIF
  192.  IF Vine IS Tied THEN
  193.   IMAGE Vine Cliff_Ledge2
  194.  ELSE
  195.   IMAGE Vine Vine
  196.  ENDIF
  197. ENDCODE
  198.  
  199. ACTION EXAMINE, LOOK, SEE, VIEW
  200.  T The vines are sturdy and long.  Remember how much fun Tarzan had with
  201.  T vines?
  202.  IF Vine IS Tied THEN
  203.   SHOW Cliff_Ledge2
  204.  ELSE
  205.   SHOW Vine
  206.  ENDIF
  207. ENDACT
  208.  
  209. ACTION SWING, USE
  210.  IF PLAYER IN Forest_Canopy THEN
  211.   T You lose all caution and with a whoop and holler, you grab a vine,
  212.   T spring into the air, and swing away from the tree on it.  You enjoy
  213.   T the exhilaration of the air rushing past you until ~ianother ~nlarge
  214.   T tree looms ahead.  You spend several painful seconds examining the
  215.   T tree's bark from the inside out and then you expire.
  216.   CALL BuyTheFarm
  217.  ELSE
  218.   T How are you going to do that?
  219.  ENDIF
  220. ENDACT
  221.  
  222. ACTION GET, TAKE, GRAB, FETCH
  223.  IF PLAYER HAS Vine THEN
  224.   T You already have it.
  225.  ELSE
  226.   IF Vine NOT Tied THEN
  227.    T You gather the vine into a coil and tie it to your belt.
  228.    GRAB Vine
  229.    IF Vine IS FirstGrab THEN
  230.     SCORE 5
  231.     UNSET Vine FirstGrab
  232.    ENDIF
  233.   ELSE
  234.    T You can't.  It is tied firmly to the base of the tree.
  235.   ENDIF
  236.  ENDIF
  237. ENDACT
  238.  
  239. ACTION DROP
  240.  IF PLAYER HAS Vine THEN
  241.   T Dropped.
  242.   DROP Vine
  243.  ELSE
  244.   T You don't have the vine to drop.
  245.  ENDIF
  246. ENDACT
  247.  
  248. ACTION TIE, FASTEN
  249.  IF PLAYER IN Ledge THEN
  250.   IF PLAYER HAS Vine THEN
  251.    IF Vine NOT Tied THEN
  252.     IF USING Small_Tree THEN
  253.      T You tie the vine tightly around the base of the tree.
  254.      SET Vine Tied
  255.      LINK Ledge D River_Path
  256.      DROP Vine                 * leave the vine here!
  257.      IMAGE Ledge Cliff_Ledge2  * update image to show vine!
  258.      IMAGE Vine Cliff_Ledge2
  259.      SHOW Cliff_Ledge2
  260.      SCORE 10
  261.     ELSE
  262.      T I think you're confused.
  263.     ENDIF
  264.    ELSE
  265.     T You already did that.
  266.    ENDIF
  267.   ELSE
  268.    T You don't have the vine.
  269.   ENDIF
  270.  ELSE
  271.   T You can't do that.
  272.  ENDIF
  273. ENDACT
  274.  
  275. ACTION CLIMB
  276.  IF Vine IS Tied THEN
  277.   T You rapell down the vine, but find that it is about ten feet shy of
  278.   T reaching the ground.  You jump the remaining distance.
  279.   GO River_Path
  280.  ELSE
  281.   T How do you propose to do that?
  282.  ENDIF
  283. ENDACT
  284.  
  285. ENDOBJ
  286. *
  287. *
  288. *
  289. OBJECT Water
  290.  
  291. NAME Water
  292.  
  293. ATTRIB
  294.  Drunk N
  295. ENDATTRIB
  296.  
  297. INITROOM Water_Passage
  298.  
  299. CODE
  300. ENDCODE
  301.  
  302. ACTION LOOK, EXAMINE, SEE, VIEW
  303.  T Yes, that is, without a doubt, water.
  304. ENDACT
  305.  
  306. ACTION SWIM
  307.  T You are swept away by the current and drowned.
  308.  CALL BuyTheFarm
  309. ENDACT
  310.  
  311. ACTION DRINK
  312.  IF Water NOT Drunk THEN
  313.   SCORE 5
  314.   SET Water Drunk
  315.  ENDIF
  316.  T Yum.  Refreshing!
  317. ENDACT
  318.  
  319. ENDOBJECT
  320. *
  321. *
  322. *
  323. OBJECT Small_Tree
  324.  
  325. NAME Tree, Bush
  326.  
  327. ADJ Small, Young, Sturdy
  328.  
  329. INITROOM Ledge
  330.  
  331. CODE
  332.  T There is a small tree growing from between the rocks here.
  333. ENDCODE
  334.  
  335. ACTION EXAMINE, LOOK, SEE, VIEW
  336.  T It is a small but sturdy young tree.
  337. ENDACT
  338.  
  339. ACTION CLIMB
  340.  T It is far too small to climb.
  341. ENDACT
  342.  
  343. ENDOBJECT
  344. *
  345. * ----- END OF FILE
  346. *
  347.